package cn.ainit.sys.utils;

import java.text.SimpleDateFormat;
import java.util.Date;



public class DateTimeStr {
	/***
	 * 返回 2000-01-01 10:10:10
	 * @return
	 */
	public static String getFullDateTimeStr(){
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String dateStr = df.format(new Date());
		return dateStr;
	}
	/***
	 * 返回时间  00:00:00
	 * @return
	 */
	public static String getTimeStr(){
		SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
		String dateStr = df.format(new Date());
		return dateStr;
	}
	/**
	 * 返回时间 2000-01-01
	 * @return
	 */
	public static String getDateTime() {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
		java.util.Date Now = new java.util.Date();
		String NDate = formatter.format(Now);
		return NDate;
	}
	/**
	 * 返回时间 20000101
	 * @return
	 */
	public static String getDateTimeNo() {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
		java.util.Date Now = new java.util.Date();
		String NDate = formatter.format(Now);
		return NDate;
	}
	/***
	 * 返回 2000-01-01 10:10:10
	 * @return
	 */
	public static String formatFullDateTimeStr(Date date){
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String dateStr = df.format(date);
		return dateStr;
	}
	/***
	 * 返回时间  00:00:00
	 * @return
	 */
	public static String formatTimeStr(Date date){
		SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
		String dateStr = df.format(date);
		return dateStr;
	}
	/***
	 * 返回时间  2013-08-05
	 * @return
	 */
	public static String formatDateStr(Date date){
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		String dateStr = df.format(date);
		return dateStr;
	}
	/***
	 * 返回时间  2013080501010100
	 * @return
	 */
	public static String formatDateStrLong(){
		Date date = new Date();
		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
		String dateStr = df.format(date);
		return dateStr+System.currentTimeMillis()/1000;
	}
	
	/***
	 * 返回时间 2013-12-30 星期一
	 * @param data
	 * @return
	 */
	public static String formatDataWeek(Date date){
		SimpleDateFormat df = new SimpleDateFormat("yyyy年MM月dd日  E");
		String dateStr = df.format(date);
		return dateStr;
	}
	
}
